<?php
 require('Header.php');
?>

Hello <fb:name uid='<?php echo $fb_user; ?>' useyou='false' possessive='true' />! Welcome to Small World!

<?php
//check for extended permissions link
   // $hasAppPermission = $facebook->api_client->Users.hasAppPermission();
   // echo "User has " . $hasAppPermission; 
 // $fql = 'SELECT first_name, last_name, affiliations, profile_update_time, religion, birthday, sex, hometown_location, meeting_sex, meeting_for, relationship_status, offline_access FROM user';
  $fql = 'SELECT first_name,last_name FROM user WHERE uid='.$fb_user.'';
 //,permissions WHERE uid='.$fb_user.') AND offline_access = 'true'';
  $data = $facebook->api_client->fql_query($fql);
  var_dump ($data);
  $fb_user_firstname = $data[0]['first_name'];
  $fb_user_lastname = $data[0]['last_name'];
  echo "\n" . $fb_user_firstname;
  echo "\n" . $fb_user_lastname;
?> 
